package pl.perseus.service.userclasses;

import lombok.Data;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import pl.perseus.dao.IUserClassesDao;
import pl.perseus.model.User;
import pl.perseus.model.UserClasses;

@Data
@Service
@Transactional
public class UserClassesService implements IUserClassesService{

	@Autowired
	private IUserClassesDao userclassesDao;
	
	@Override
	public UserClasses insertUserClasses(UserClasses uc) {
		return userclassesDao.insertUserClasses(uc);
	}
	
	@Override
	public UserClasses selectByIdUserClasses(Long id){
		return userclassesDao.selectByIdUserClasses(id);
	}
	
	@Override
	public UserClasses deleteUserClasses(UserClasses uc) {
		return userclassesDao.deleteUserClasses(uc);
	}
	
	@Override
	public void deleteByUser(User u){
		userclassesDao.deleteByUser(u);
	}

}
